import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;
import services.Knight;

public class main {
    public static void main(String[] args) {
        FileSystemXmlApplicationContext context = new FileSystemXmlApplicationContext("C:\\Users\\fsk\\Desktop\\springinaction\\spring-in-action-test\\test1\\src\\main\\resources\\knight.xml");
        Knight bean = context.getBean(Knight.class);
        bean.embarkOnquest();
//        ApplicationContext annotationConfigApplicationContext = new AnnotationConfigApplicationContext("KnightConfig");
//        Knight bean = annotationConfigApplicationContext.getBean(Knight.class);
//        bean.embarkOnquest();
    }
}
